import request from "@/utils/request";

// 查询试验室仪器列表
export function listBsInstrument(query) {
  return request({
    url: "/dept/bsInstrument/list",
    method: "get",
    params: query
  });
}
// 查询试验室（科室-仪器）列表树
export function queryBsDepartmentTree(query) {
  return request({
    url: "/dept/bsDepartment/tree",
    method: "get",
    params: query
  });
}
// 查询试验室仪器详细
export function getBsInstrument(instruId) {
  return request({
    url: "/dept/bsInstrument/" + instruId,
    method: "get"
  });
}

// 新增试验室仪器
export function addBsInstrument(data) {
  return request({
    url: "/dept/bsInstrument",
    method: "post",
    data: data
  });
}

// 修改试验室仪器
export function updateBsInstrument(data) {
  return request({
    url: "/dept/bsInstrument",
    method: "put",
    data: data
  });
}

// 删除试验室仪器
export function delBsInstrument(instruId) {
  return request({
    url: "/dept/bsInstrument/" + instruId,
    method: "delete"
  });
}


// 上传试验室仪器
export function importData(data) {
  return request({
    url: "/dept/bsInstrument/importData",
    method: "post",
    data: data
  });
}

export function upLoading(data, config) {
  return request({
      url: "/dept/bsInstrument/importData",
      method: "post",
      data: data,
      timeout: 1200000,
      ...config
  });
}